const path = require("path");
const WebpackNotifierPlugin = require("webpack-notifier");
const CompressionWebpackPlugin = require('compression-webpack-plugin');
const productionGzipExtensions = ['js', 'css', 'json'];
process.env.VUE_APP_TIME = Date.now() + '';

module.exports = {
    publicPath: '',
    devServer: {
        proxy: {
            '/api/': {
                target: 'http://172.18.66.66:8099/',
                changeOrigin: true,
                autoRewrite: true
            }
        }
    },
    configureWebpack: {
        plugins: [
            new CompressionWebpackPlugin({
                test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
                threshold: 10240,
                deleteOriginalAssets: false
            }),
            new WebpackNotifierPlugin({ alwaysNotify: true }),
        ],
    },
    transpileDependencies: [
        'vue-echarts',
        'resize-detector'
    ]
}
